The present invention relates to an arrangement and a method respectively for handling or administrating, particularly accessing, digital buffers arranged in a digital buffer memory. The invention also relates to a processing arrangement or a processor in which is arranged at least one digital buffer memory comprising a number of digital buffers.
Digital buffer memories or particularly so called job buffer memories are often comprised in for example digital processors. Such a job buffer memory often comprises a number of job buffers. A job buffer may take a number of different forms, for example it may be a circular buffer. Digital buffers are for example used for the purpose of more or less temporarily storing information which is to be transmitted from one unit/arrangement to another within e.g. a processor or during exchange of information between different processors etc.
However, the administration of job buffers may be complex and time consuming and for example it may require a great number of micro program steps. Mostly software solutions form the basis for the administration of the buffers. One known arrangement comprises a job buffer memory with a number of job buffers wherein each job buffer is a circular buffer (first In, first out buffer) which is used for storing signals. The signal may comprise several words of data and the size of the job buffer is not fixed each job buffer has a set of administrative pointers associated thereto which are arranged in a pointer register of a reference memory which is external to the buffer area. In this known arrangement it comprises four administrative pointers, a start pointer relating to the absolute physical address in the job buffer memory where the job buffer starts, an end pointer relating to the absolute physical address where the buffer ends, an in pointer relating to the absolute physical address in the job buffer memory where data should be written and finally an out pointer giving the absolute physical address in the job buffer memory where data is to be read. When an address is needed, it is output from the relevant pointer which then is increased or decreased by a given amount. If the buffer is a circular buffer, wrap around may occur if the increase or decrease is such that an in pointer gets lower than the out pointer.
When a signal is to be stored into a job buffer, it must be checked if there is space enough in the buffer for storing the signal. It must also be checked if a wrap around occurs. The signal is stored starting from the address pointed at by the in pointer. Thereafter the in pointer is updated in the pointer register, i.e. the reference memory.
When a signal is to be read from the buffer, the out pointer must be fetched from the reference memory and the signal from the job buffer memory pointed at by the out pointer is read. It has to be checked if wrap around occurs and finally the out pointer has to be updated in the reference memory. Thus the number of program steps which are required for storing and fetching of data in the job buffers is high.
WO 92/08186 shows a hardware implemented system for generating and accessing addresses in a job buffer. Particularly the invention disclosed therein describes an address generator for generating target addresses in a circular buffer which is defined by a base address and an end address. It comprises a register (I) for storing the previous address which was accessed within the buffer, register means for storing information defining the position and size of the circular buffer in the buffer memory, e.g. a base register and a length register or a base register and an end register. Furthermore the arrangement comprises a modify register in which is loaded the increment or decrement value relating to an offset. Further the arrangement comprises an adder through which an absolute address is generated by calculating the value of the previous stored address plus the off set and logic means for generating a wrapped address through modification of the above mentioned value by the length of the buffer. Moreover it comprises means for determining if the wrapped address is within the bounds of the circular buffer and finally means for loading the register in which the previous address accessed within the buffer is stored, either the absolute address or the wrapped address.
Thus the addresses are calculated before loading into the register. It is thus necessary to load the base register, the end register (or the length register) and the I register and particularly also the M register (offset) before reading or writing in the buffer memory. Thus four program steps are required which is an disadvantage. Furthermore, it is not possible to read and write at the same time with the known arrangement. To summarise, the arrangement, apart from the above mentioned, is not sufficiently fast, particularly not if there are many job buffers in the buffer memory.